<!DOCTYPE html>
<html>
<head>
    <title>Bootstrap5 实例</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <script src="../bootstrap/js/bootstrap.bundle.min.js"></script>
</head>
<body>


<div class="container">
    <h2>新增产品</h2>
    <p>产品名称，价格，有效日期：</p>
    <form action="add.do" class="was-validated" method="post">
        <div class="form-group">
            <label for="name">产品name:</label>
            <input type="text" class="form-control" id="name" placeholder="Enter product name" name="name" required>
            <div class="valid-feedback">验证成功！</div>
            <div class="invalid-feedback">请输入用户名！</div>
        </div>
        <div class="form-group">
            <label for="pwd">价格:</label>
            <input type="text" class="form-control" id="pwd" placeholder="Enter price" name="price" required>
            <div class="valid-feedback">验证成功！</div>
            <div class="invalid-feedback">请输入密码！</div>
        </div>
        <div class="form-group">
            <label for="expireDate">age:</label>
            <input type="date" class="form-control" id="expireDate" placeholder="Enter expireDate" name="expireDate" required>
            <div class="valid-feedback">验证成功！</div>
            <div class="invalid-feedback">请输入年龄！</div>
        </div>
        <div class="form-group form-check">
            <label class="form-check-label">
                <input class="form-check-input" type="checkbox" name="remember" required> 同意协议
                <div class="valid-feedback">验证成功！</div>
                <div class="invalid-feedback">同意协议才能提交。</div>
            </label>
        </div>
        <button type="submit" class="btn btn-primary">新增产品</button>
    </form>
</div>

</body>
</html>